/**
 * Copyright (C), 2015-2022, XXX有限公司
 * <p>
 * FileName: AuthStatusEnum
 * <p>
 * Author: 12044
 * <p>
 * Date: 2022/1/19 17:20
 * <p>
 * Description:
 * <p>
 * History:
 *
 * <author> <time> <version> <desc>
 * <p>
 * 作者姓名 修改时间 版本号 描述
 */


package com.atguigu.yygh.enums;


/**
 * 〈一句话功能简述〉<br>
 * 〈〉
 *
 * @author 12044

 * @create 2022/1/19

 * @since 1.0.0

 */

public enum AuthStatusEnum {
    NO_AUTH(0, "未认证"),
    AUTH_RUN(1, "认证中"),
    AUTH_SUCCESS(2, "认证成功"),
    AUTH_FAIL(-1, "认证失败"),
    ;

    private Integer status;
    private String name;

    AuthStatusEnum(Integer status, String name) {
        this.status = status;
        this.name = name;
    }

    public static String getStatusNameByStatus(Integer status) {
        AuthStatusEnum arrObj[] = AuthStatusEnum.values();
        for (AuthStatusEnum obj : arrObj) {
            if (status.intValue() == obj.getStatus().intValue()) {
                return obj.getName();
            }
        }
        return "";
    }


    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
